efscopy - Extent File System Copy Tool

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


efscopy is a binary tool that you can use to clone your disk image quickly.


**** SGI DISCLAIMER ****

USE efscopy SOFTWARE AND THE INFORMATION CONTAINED IN THIS README FILE STRICTLY AT YOUR OWN RISK. efscopy IS AN UNRELEASED AND ENTIRELY UNSUPPORTED SOFTWARE TOOL FROM SILICON GRAPHICS. ITS AVAILABILITY OUTSIDE OF SILICON GRAPHICS IS INTENDED FOR THE NONCOMMERCIAL USE BY MEMBERS OF THE SILICON GRAPHICS DEVELOPER PROGRAM. DISTRIBUTION TO NONMEMBERS IS PROHIBITED.


TABLE OF CONTENTS

 ________________________________________________________________________
 |                                                                      |
 |              Copyright (C) 1995, Silicon Graphics, Inc.              |
 |                        All Rights Reserved.                          |
 |                                                                      |
 | UNPUBLISHED -- Rights  reserved  under  the  copyright  laws  of the |
 | United States.  Use  of a copyright notice is precautionary only and |
 | does not imply publication or disclosure.                            |
 |                                                                      |
 | THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION |
 | OF SILICON GRAPHICS, INC.  ANY DUPLICATION, MODIFICATION,            |
 | DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR |
 | EXPRESS WRITTEN PERMISSION OF SILICON GRAPHICS, INC.                 |
 |                                                                      |
 | U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND                             |
 | Use, duplication or disclosure by the Government is subject to       |
 | restrictions as set forth in FAR 52.227.19(c)(2) or                  |
 | subparagraph (c)(1)(ii) of the Rights in Technical Data and          |
 | Computer Software clause at DFARS 252.227-7013 and/or in similar or  |
 | successor clauses in the FAR, or the DOD or NASA FAR Supplement.     |
 | Unpublished-- rights reserved under the copyright laws of the United |
 | States.  Contractor/manufacturer is Silicon Graphics, Inc.,          |
 | 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.               |
 |______________________________________________________________________|


  • I. Why You Should Use efscopy
            * End-user uses:
              It's a fast, easy, and reliable method to restore the 
              exact same bits on your disk drive.
    
            * Manufacturing uses:
              It's a reliable disk duplication and turnkey system 
              production process to have the identical disk image on all  
              units to be shipped.
    
            * System test/debugging uses:
              It provides quick restoration of a "unit under test" to  
              original system state prior to execution of 
              your test suites.
    
            * Tradeshows/conference lab/training session setups:
              It provides rapid duplication and distribution of data 
              from a "master disk" to provide consistency across
              machines in a tradeshow or lab environment. 
    
            * Because it is fast.
              efscopy is faster than the
              partition to partition copy of "sash cp" (which is
              described in the "Advanced Site and Server Guide").   
              You can restore an efscopy'ed image file onto multiple
              target devices simultaneously, such as 
              "efscopy file target1 target2 ..." and "sash cp" cannot.
    

  • II. Advantages of efscopy Over Other Forms of Copy
            In particular, "sash cp" in the Command Monitor
            cannot do what efscopy does nor as fast.
    
            * fast (approx. = less than 1 minute per 100MB)
            * reliable
            * easy to use, i.e. very few arguments to efscopy
            * independent of disk drive geometry. efscopy copies
              only the "used" bits.  A 400MB populated image on a
              1GB capacity drive can be efscopy'ed onto a 400+
              MB efscopy file, then restored onto a 500MB
              capacity disk drive.
    

  • III. What efscopy Does
            * efscopy copies an entire disk onto a special efs
              (Extent File System) file on your SGI workstation.
              We will call this an "efscopy file."
    
              - copy an option disk to an efscopy file
              - copy a system disk that is mounted as an option disk.
    
            * efscopy restores the efscopy file onto any geometry disk.
              - restore from local efscopy file to option disk
              - restore from a NFS-mounted copy to an option disk.
    
    

  • IV. What efscopy Does Not Do
            efscopy does not
    
            * Copy Silicon Graphics XFS filesystem images
              (An xfscopy version is being considered for implementation)
            * Repartition your disk drive
            * Change any information in the volume header
    
    

  • V. What You Need in Order to Use efscopy
            * efscopy executable, which is a:
    
              ELF 32-bit MSB dynamic executable (not stripped) MIPS
              - version 1
    
            * Enough disk space to create the efs file.  Generally about
              3% more disk space for the efscopy file than what is shown
              from a "df -k" display of the kilobytes "use".
              For example,
    
              % df -k /disk2        ...shows:
    
    Filesystem                 Type  kbytes     use   avail %use  Mounted on
    /dev/dsk/dks0d2s7           efs  410002  210611  199391  51%  /disk2
    
              ...you will need another 222135634 bytes
              (approx = 210611 * 1024 * 1.03 ) to contain
              the efscopy file for the entire /disk2 filesystem.
     
            * You will need root privileges on your machine to restore
              an efscopy file onto a disk.
    
            * Use of efscopy requires some knowledge of disk filesystems
              and partitions.  You should be familiar with these terms,
              or read the listed references.
     
            Filesystem                      - man fs(4), efs
                                            - man mkfs(1)
            Special Files or Device Names   - man intro(7)
            Disk Partition                  - man root(7), dks, fx
    
    

  • VI. efscopy Command Syntax
                usage: efscopy [-v] fromdev|fromfile todev [todev ...]
                   or: efscopy [-v] fromdev|fromfile tofile
    
                    Refer to the man page on the use of /dev/dsk device names
                    "man intro(7) - introduction to special files".
    
    

  • VII. Using efscopy (A) - Copying Option Disk to an efscopy File
                  Copy the efscopy executable from the Developer Toolbox
                  directory onto your /sbin directory.
                  The placement in this directory is a suggestion.
    
    -----------------------------------------------------------------------
            A. Copying Option Disk to an efscopy File
    -----------------------------------------------------------------------
    
            Usage Notes:
    
                    End User        - make a copy of one of your disks.
                    Manufacturing   - make a master copy of the option disk.
    
            Disk Drive Depiction:
    
                    TARGET FILE                     SOURCE DEVICE
                    +--------+                      +--------+
                    |scsi 0,1|                      |scsi 0,2|
                    +--------+                      +--------+
    
                    IRIX runs here                  * unmounted
                    * /sbin/efscopy
                    * efscopy file  <--------       /dev/dsk/dks0d2s7
    
                    Prerequisites:
                    * efscopy will copy from a Source Device to a Target File.
                    * You need write permissions to the Target File directory,
                      it is best that you are "root".
                    * The Source Device must be unmounted, so no programs can
                      be running on that filesystem (Source Device) or any
                      shell currently accessing it.
                    * In this example, we have a system disk and
                      an option disk.
    
                        System disk is running IRIX OS
                        Option disk is /dev/rdsk/dks0d2s7 mounted on /d2
                        as shown in the following example.  A "df -k" shows:
    
    Filesystem                 Type  kbytes     use   avail %use  Mounted on
    /dev/root                   efs   20027   11706    8321  58%  /
    /dev/usr                    efs  954324   30870  923454   8%  /usr
    /dev/dsk/dks0d2s7           efs  961845  272371  689494  28%  /d2
    
    
         Notes on Partition: fx(1), dksc(7), prtvtoc(1), dvhtool(1)
         The standard partition allocation by Silicon Graphics has root on
         partition 0, swap on partition 1, and /usr on partition 6.
         This partitioning is also called "rootusrdrive".  There is also
         partitioning formats of "rootdrive" and "optiondrive".
         Please note the differences of these formats in how they are mapped
         to device names of the form /dev/dsk/dks.d.s.
    
                    * You have verified that there is enough free space
                      available on your Target directory.
                      In this example, that is an extra 287275141 bytes
                      on the /usr filesystem (272371 * 1024 * 1.03).
    
            Steps:
    
                    1. <su>
                       You need it for the umount.
    
                    2. umount /d2
                            : If you encounter "device busy", make sure no
                            : access to this filesystem is still active.
                            : Try the -k kill option if necessary:
                            : "umount -k /d2" or try "fuser(1)"
    
                    3. % efscopy -v /dev/rdsk/dks0d2s7 /usr/d2.efscopy
    
                            : Note that there is only one option to efscopy,
                            : which is -v for verbose mode.  Use it.
                            : Using another other - option will get you a plain
                            : usage description as:
                              % efscopy -h
                                Illegal option -- h
                                usage: efscopy [-v] fromdev|fromfile todev ...
                                   or: efscopy [-v] fromdev|fromfile tofile
    
                            : Note the use of rdsk or the character device
                            : name instead of dsk the block device name.
                            : efscopy is more efficient in character form.
    
                    4. ...expect to see...
                       reading 9999 nodes..10%..20%...90%..done
                       writing 99999 nodes..10%..20%...90%..done
                       lastalloc/maximum=99999
                       block delta -1
    
    

  • VII. Using efscopy (B) - Copying a System Disk That Is Mounted as an Option Disk
    -----------------------------------------------------------------------
            B. Copying a System Disk That Is Mounted as an Option Disk
    -----------------------------------------------------------------------
    
            Usage Notes:
    
                    * Manufacturing - make a master copy of the system disk.
                    * System Test   - make a copy of the system disk before
                                      running your test suites.
                    * Tradeshow     - make a copy of the master system disk,
                                      for distribution to each machine.
    
            Disk Drive Connection and Mount:
    
                    * This scenario is for making an efscopy file of a
                      system (root formatted) drive.  Because an efscopy
                      Source Device has to be unmounted, you cannot make an
                      efscopy file of the system drive that is running
                      your machine.
                    * You will need:
                      - For the system disk that you want to make an
                        efscopy, remove it from its drive bay.
                        Call this the "master" disk.
                      - An SGI system with its own system disk that contains
                        the efscopy executable and enough disk space to
                        hold the efscopy file.  Let say this is an Indy and
                        its second drive bay is empty...for you to connect
                        the "master" disk.
                    Here is the picture:
    
            =======================<
            |            +--------+
            |       I    |scsi 0,1|
            |       N    +--------+
            |       D  ------------<
            |       Y                       +--------+ "master"
            |                       <====   |scsi 0,2| System Disk
            |                               +--------+
            =======================<
    
    
                    1.  You have in your hand the "master" system disk.
    
                    2.  Configure the disk drive to be Scsi Controller 0,
                        Unit 2.  The instructions to do this are dependent
                        on the disk drive manufacturer.
    
                    3.  Power off the Indy system that you will use.
    
                    4.  Plug data pin and power connectors of the disk drive
                        into the spare/empty disk bay of the Indy.
                    5.  Power on...when the following message appears,
                        "Starting up the System",
                        press Escape to get to the Prom Menu.
                    6.  Select option 5, Command Monitor, and type hinv to
                        verify that you have SCSI 0, unit 1, and unit 2.
                    7.  If yes, exit Command Monitor, and start the system.
                    8.  Once the system is up, open up a shell and type "df -k:
                        Unless your /etc/fstab already contains an entry for
                        drive unit 2, then df will not show it as mounted.
                    9.  Since Unit 2 will be the Source Device in this example
                        you will not need to mount it, but if you do, then:
    
                        % su
                        # mount -v -t efs -o 'rw,raw=/dev/rdsk/dks0d2s0 0 0' \
                            /dev/dsk/dks0d2s0 /d2
    
            ** Now the following steps are the same as Step A, except for the
               use of partition 0 in /dev/dsk/dks0d2s0
    
            Disk Drive Depiction:
    
                    TARGET FILE                     SOURCE DEVICE
                    +--------+                      +--------+
                    |scsi 0,1|                      |scsi 0,2|
                    +--------+                      +--------+
    
                    IRIX runs here                  * unmounted
                    * /sbin/efscopy
                    * efscopy file  <--------       /dev/dsk/dks0d2s0
    
                    Prerequisites:
                    * efscopy will copy from a Source Device to a Target File.
                    * You need write permissions to the Target File directory,
                      it is best that you are "root".
                    * The Source Device must be unmounted, so no programs can
                      be running on that filesystem (Source Device) or any
                      shell currently accessing it.
                    * In this example, we have a system disk and
                      an option disk.
    
                      System disk is running IRIX OS
                      Option disk is /dev/rdsk/dks0d2s0 mounted on /d2
                      A "df -k" shows:
    
    Filesystem                 Type  kbytes     use   avail %use  Mounted on
    /dev/root                   efs   20027   11706    8321  58%  /
    /dev/usr                    efs  954324   30870  923454   8%  /usr
    /dev/dsk/dks0d2s0           efs  961845  272371  689494  28%  /d2
    
    
                    * You have verified that there is enough free space
                      available on your Target directory.
                      In this example, that is an extra 287275141 bytes
                      on the /usr filesystem.
    
            Steps:
    
                    1. <su>
                       You need it for the umount.
    
                    2. umount /d2
                            : If you encounter "device busy", make sure no
                            : access to this filesystem is still active.
                            : Try the -k kill option if necessary:
                            : "umount -k /d2" or try "fuser(1)"
    
                    3. % efscopy -v /dev/rdsk/dks0d2s0 /usr/d2.efscopy
    
                            : Note that there is only one option to efscopy,
                            : which is -v for verbose mode.  Use it.
                            : Using another other - option will get you a plain
                            : usage description as:
                              % efscopy -h
                                Illegal option -- h
                                usage: efscopy [-v] fromdev|fromfile todev ...
                                   or: efscopy [-v] fromdev|fromfile tofile
    
                            : Note the use of rdsk or the character device
                            : name instead of dsk the block device name.
                            : efscopy is more efficient in character form.
    
                    4. ...expect to see...
                       reading 9999 nodes..10%..20%...90%..done
                       writing 99999 nodes..10%..20%...90%..done
                       lastalloc/maximum=99999
                       block delta -1
    
    
    

  • VII. Using efscopy (C) - Restoring a Local efscopy File to Disk
    -----------------------------------------------------------------------
            C. Restoring a Local efscopy File to Disk
    -----------------------------------------------------------------------
    
            Usage Notes:
    
                    * End User      - Restore an option disk.
                    * Manufacturing - SGI Manufacturing has used efscopy
                                      to multiple targets, using an expansion
                                      box of SCSI drives for up to 4
                                      different disks, and the only
                                      limitation on speed is the I/O rate.
    
            Disk Drive Depiction:
    
                    SOURCE FILE                     TARGET DEVICE
                    +--------+                      +--------+
                    |scsi 0,1|                      |scsi 0,2|
                    +--------+                      +--------+
    
                    IRIX runs here                  * unmounted
                    * /sbin/efscopy
                    * efscopy file  -------->       /dev/dsk/dks0d2s7
    
                    Prerequisites:
                    * efscopy will copy from a previously generated efscopy
                      file to a Target Device.  You will need the
                      efscopy executable.
                    * You need "root" privileges to execute these steps.
                    * The Target Device must be unmounted, so no programs can
                      be running on that filesystem (Target Device) or any
                      shell currently accessing it.
                    * In this example, we have a system disk and
                      an option disk.
    
                      System disk is running IRIX OS
                      Option disk is /dev/rdsk/dks0d2s7 mounted on /d2
                      A "df -k" shows:
    
    Filesystem                 Type  kbytes     use   avail %use  Mounted on
    /dev/root                   efs   20027   11706    8321  58%  /
    /dev/dsk/dks0d2s7           efs  961845  272371  689494  28%  /d2
    
    
                    * You have verified that there is enough physical
                      capacity on the Target Device to contain all the
                      bytes of the efscopy file.  "ls -l" on the efscopy
                      file and examine the number of bytes of the
                      efscopy file.  Compare this number with the
                      "kbytes" column for the drive.  The efscopy
                      file byte size must be less than kbytes*1024.
    
                    * WARNING:  EFSCOPY WILL COMPLETELY
                      ERASE ANY PREVIOUS DATA YOU HAVE ON YOUR
                      TARGET DEVICE.  PROCEED ONLY IF
                      YOU HAVE ARCHIVED ANY DATA THAT NEEDS SAVING.
    
            Steps:
                    1. <su>
                       You need it for the umount.
    
                    2. Note that the disk drive partition is not
                       being changed here.  This example shows
                       an attempt to restore to a Target
                       Device originally partitioned as Partition 7
                       (dks0d2s7).  Also this example assumes that
                       the efscopy file was previously created from
                       this matching partition 7.  Reference fx(1)
                       if you want to re-partition your disk drive.
    
                    3. umount /d2 (if it isn't already umounted)
                            : If you encounter "device busy", make sure no
                            : access to this filesystem is still active.
                            : Try the -k kill option if necessary:
                            : "umount -k /d2" or try "fuser(1)"
    
                    WARNING:  THE FOLLOWING STEP WILL ERASE ALL DATA
                              ON YOUR DISK (partition 7)!
    
                        # mkfs /dev/rdsk/dks0d2s7
                        # mkfs -r /dev/rdsk/dks0d2s7
                        # efscopy -v /usr/d2.efscopy /dev/rdsk/dks0d2s7
    
                            : -v for verbose mode.  Use it.
                            : Note the use of rdsk or the character device
                            : name instead of dsk the block device name.
                            : efscopy is more efficient in character form.
    
      Explanation of the two "mkfs" -
    
      efscopy enforces strict requirements for usage.
      efscopy takes lost+found directory into account.
      That is, it requires that the filesystem have exactly 2 inodes
      in use (inode 2 for . and 3 for lost+found) and that 21 blocks
      be in use: 1 for the . directory block and 20 for the lost+found
      directory block.  Thus the two mkfs are back to back.
    
                    4.  ...expect to see...
                        reading 9999 nodes..10%..20%...90%..done
                        writing 99999 nodes..10%..20%...90%..done
                        lastalloc/maximum=99999
                        block delta -1
    
                    5.  Run "fsck -y" on the filesystem.
                        "mount -c" or reboot will also invoke fsck.
                        If you attempt to mount this filesystem without 
                        fsck you will get a "Dirty Filesystem" message.
    
    

  • VII. Using efscopy (D) - Restoring a Remote efscopy File to a Local Disk
    -----------------------------------------------------------------------
            D. Restoring a Remote efscopy File to a Local Disk
    -----------------------------------------------------------------------
    
            Usage Notes:
    
                    * Manufacturing - make a master copy of the system disk.
                                      SGI Manufacturing has used efscopy to
                                      multiple targets, using an expansion
                                      box of SCSI drives for up to 4
                                      different disks, and accessing the
                                      efscopy file over the network.
                    * System Test   - make a copy of the system disk before
                                      running your test suites.
                    * Tradeshow     - make a copy of the master system disk,
                                      so that you can duplicate it for each
                                      Lab machine.  What we did in one trade
                                      show was set aside 4 machines to
                                      efscopy from the master disk over the
                                      Trade Show network.  Thus in much
                                      shorter time than expected, 20 system
                                      disks were duplicated.
                                      The slow part of this was really the
                                      manual task of taking a disk drive
                                      from one machine and placing it into
                                      another machine as a Target Device.
    
            Disk Drive Depiction:
    
            |========== LOCAL MACHINE ==========|       |==MASTER MACHINE==|
            |               TARGET DEVICE       |       |     remote       |
            +--------+         +--------+       |       |                  |
            |scsi 0,1|         |scsi 0,2|       |       |                  |
            +--------+         +--------+       |       |                  |
            |                                   |       |                  |
            IRIX runs here     * unmounted      |       |                  |
            * /sbin/efscopy    /dev/dsk/dks0d2s7 <-NFS->| efscopy file     |
    
            Prerequisites:
    
            For this example, there are 2 machines, one named
            "local" and the other is named "master".
            Both machines are connected on your local network.
    
            On the "master" machine:
                    1.  You have previously generated a efscopy file of a
                        disk image that you have determined to be worth
                        restoring or duplicating onto other disks.
                        Ensure you have root privileges on this machine.
    
                        % su
                        #
    
                    2.  The intend is to make this efscopy file, accessible by
                        anyone in the local area network.
                        Export the directory where this file resides.
                        In this example, this file is on
                        /disk3/5.3master.efscopy
    
                        (man exportfs(1) for reference)
    
                        # ...add this line to your /etc/exports file
                            /disk3 -ro
                        # exportfs -a
    
            On the "local" machine:
                    1.  efscopy will copy from a previously generated efscopy
                        file to a Target Device.  You need a copy of the
                        efscopy executable.
                    2.  You need "root" privileges to execute these steps.
                    3.  The Target Device must be unmounted, so no programs can
                        be running on that filesystem (Target Device) or any
                        shell currently accessing it.
                    4.  In this example, we have a system disk and
                        an option disk.
    
                        System disk is running IRIX OS
                        Option disk is /dev/rdsk/dks0d2s7 mounted on /d2
                        A "df -k" shows:
    
    Filesystem                 Type  kbytes     use   avail %use  Mounted on
    /dev/root                   efs   20027   11706    8321  58%  /
    /dev/dsk/dks0d2s7           efs  961845  272371  689494  28%  /d2
    
                    5.  Is the "master" machine's /disk3 directory NFS mounted?
                        If not, try this mount command:
    
                        (man fstab(4), mount(1) for reference)
    
                # mkdir /disk3      :not needed if /disk3 is already created
                # mount -v -t nfs -o "ro,bg,soft,intr 0 0" master:/disk3 /disk3
    
                    6.  Verify that there is enough physical
                        capacity on the Target Device to contain the entire
                        efscopy file.
    
                        "ls -l" on the efscopy file and examine the number
                        of bytes of the efscopy file.
    
                        # ls -l /disk3/*
    
                        Compare this number with the "kbytes" column for
                        the drive, the efscopy file byte size must be
                        less than kbytes*1024.
    
                      WARNING:
                        EFSCOPY WILL COMPLETELY ERASE ANY PREVIOUS DATA
                        ON THE TARGET DEVICE.  PROCEED ONLY IF
                        THIS DATA IS EXPENDABLE OR HAS BEEN ARCHIVED.
    
            Steps:
    
                    1. <su>
                       You need it for the following steps.
    
                    2. Note that the disk drive partition is not being
                       changed here.  This example shows an attempt
                       at restoring to a Target Device originally
                       partitioned as Partition 7 (dks0d2s7).
                       This example assumes that the efscopy file
                       was previously created from this matching partition 7.
                       Reference fx(1) for instructions on re-partitioning
                       the disk drive.
    
                    3. umount /d2 (if it isn't already umounted)
                            : If you encounter "device busy", make sure no
                            : access to this filesystem is still active.
                            : Try the -k kill option if necessary:
                            : "umount -k /d2" or try "fuser(1)"
    
                    WARNING:
                            THE FOLLOWING STEP WILL ERASE ALL DATA ON THE DEVICE
    
                        # mkfs /dev/rdsk/dks0d2s7
                        # mkfs -r /dev/rdsk/dks0d2s7
                        # efscopy -v /disk3/master5.3.efscopy /dev/rdsk/dks0d2s7
    
                            : -v for verbose mode.  Use it.
                            : Note the use of rdsk or the character device
                            : name instead of dsk the block device name.
                            : efscopy is more efficient in character form.
    
                    4. ...expect to see...
                       reading 9999 nodes..10%..20%...90%..done
                       writing 99999 nodes..10%..20%...90%..done
                       lastalloc/maximum=99999
                       block delta -1
    
                    5. Run "fsck -y" on the filesystem.
                       "mount -c" or reboot will also invoke fsck.
                       If you attempt to mount this filesystem without 
                       fsck you will get a "Dirty Filesystem" message.
    
     ************************************************************************
    
        SGI DISCLAIMER:
            USE THIS SOFTWARE AND THE STEPS DESCRIBED HERE AT
            YOUR OWN RISK.  SGI IS NOT LIABLE FOR ANY UNEXPECTED
            RESULTS THAT MAY ARISE FROM YOUR DECISION TO USE THIS
            SOFTWARE AND/OR THIS INFORMATION.
    
     ************************************************************************
    
    

    Files of interest from "utilities/efscopy" directory

    Documentation


    Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
    OR, ...
    a compressed tar image of the entire efscopy directory.

    Copyright © 1995, Silicon Graphics, Inc.